-
Notifications
You must be signed in to change notification settings - Fork 13.9k
[FLINK-38263][table] add secret store related interfaces #27394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
...k-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
Outdated
Show resolved
Hide resolved
c68b3d5 to
74a6830
Compare
...k-table-api-java/src/main/java/org/apache/flink/table/secret/GenericInMemorySecretStore.java
Outdated
Show resolved
Hide resolved
...k-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
Outdated
Show resolved
Hide resolved
...-api-java/src/main/java/org/apache/flink/table/secret/GenericInMemorySecretStoreFactory.java
Show resolved
Hide resolved
...-api-java/src/main/java/org/apache/flink/table/secret/GenericInMemorySecretStoreFactory.java
Outdated
Show resolved
Hide resolved
...-api-java/src/main/java/org/apache/flink/table/secret/GenericInMemorySecretStoreFactory.java
Outdated
Show resolved
Hide resolved
...link-table-api-java/src/test/java/org/apache/flink/table/factories/TableFactoryUtilTest.java
Outdated
Show resolved
Hide resolved
...link-table-api-java/src/test/java/org/apache/flink/table/factories/TableFactoryUtilTest.java
Outdated
Show resolved
Hide resolved
...link-table-api-java/src/test/java/org/apache/flink/table/factories/TableFactoryUtilTest.java
Outdated
Show resolved
Hide resolved
...link-table-api-java/src/test/java/org/apache/flink/table/factories/TableFactoryUtilTest.java
Outdated
Show resolved
Hide resolved
...link-table-api-java/src/test/java/org/apache/flink/table/factories/TableFactoryUtilTest.java
Outdated
Show resolved
Hide resolved
...-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreFactoryTest.java
Outdated
Show resolved
Hide resolved
...-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreFactoryTest.java
Outdated
Show resolved
Hide resolved
...-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreFactoryTest.java
Outdated
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
...ink-table-common/src/main/java/org/apache/flink/table/secret/exceptions/SecretException.java
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
...ble-api-java/src/test/java/org/apache/flink/table/secret/GenericInMemorySecretStoreTest.java
Outdated
Show resolved
Hide resolved
twalthr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lihaosky.
| // TODO (FLINK-38261): pass secret store to catalog manager for encryption/decryption | ||
| final SecretStore secretStore = | ||
| settings.getSecretStore() != null | ||
| ? settings.getSecretStore() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not discover a factory if a secret store is already provided. Please also update the CatalogStoreFactory above which has the same issue. Also the TableFactoryUtil class is kind of deprecated. Move the methods for both secret and catalog store to a new org.apache.flink.table.api.internal.ApiFactoryUtil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a new PR for the refactoring: #27531
|
|
||
| @Internal | ||
| @Nullable | ||
| public SecretStore getSecretStore() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Optional, maybe also for CatalogStore for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put in new PR: #27531
| @Internal | ||
| public class GenericInMemorySecretStore implements ReadableSecretStore, WritableSecretStore { | ||
|
|
||
| private static final ObjectMapper objectMapper = new ObjectMapper(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for Jackson deps here. We can store Java objects and avoid ser/de.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Store an immutable Map<String, String>
2e8da5b to
ef5948c
Compare
What is the purpose of the change
Add secret store related api in FLIP-529
Brief change log
Verifying this change
Unit test
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes)Documentation